{% extends 'page.html' %}
{% load crispy_forms_tags settings_tags %}

{% block title %}{{ title }}{% endblock %}

{% block content %}
	<main>
        <article>
            <div class="page-title">
                <h1>{{ title }}</h1>
            </div>
            <section class="container page-content mb-5 py-5 px-4">
                <!-- Page Content -->
                {% include 'admin/messages.html' %}
                <div class="row">
                	<div class="col-md-6 col-xs-12">
                		<h2 class="h2">Get in touch</h2>
                		<p class="mb-4">
                			{{ settings.CONTACT_MESSAGE }}
                		</p>

                		{% if settings.CONTACT_PHONE %}
                			<p class="text-sub size-15 mb-4"><i class="fas fa-phone"></i> {{ settings.CONTACT_PHONE }}</p>
                		{% endif %}
                		{% if settings.CONTACT_TELEPHONE %}
        	        		<p class="text-sub size-15 mb-4"><i class="fas fa-mobile-alt"></i> {{ settings.CONTACT_TELEPHONE }}</p>
                		{% endif %}
                		{% if settings.CONTACT_EMAIL %}
							<p class="text-sub size-15 mb-4"><i class="fas fa-envelope"></i> {{ settings.CONTACT_EMAIL }}</p>
                		{% endif %}
                		{% if settings.CONTACT_LOCATION %}
	                		<p class="text-sub size-15 mb-4"><i class="fas fa-map-marker-alt"></i> {{ settings.CONTACT_LOCATION }}</p>
                		{% endif %}
                	</div>
                	<div class="col-md-6 col-xs-12">
		                <form method="POST">
		    				{% csrf_token %}
			                {{ form|crispy }}
			                <button type="submit" class="btn btn-primary">Send</button>
		                </form>
                	</div>

                </div>
                <!-- / Page Content -->
            </section>
            {% if settings.CONTACT_MAP %}
	            <section class="container-fluid p-0 map-iframe">
	            	{{ settings.CONTACT_MAP|safe }}
	            </section>
	            {% endif %}
        </article>
    </main>
{% endblock %}
